<?php

namespace app\servercertificate\service\certificate;
use app\manage\service\ApiBase;

/**
 * @author:      李颖
 * @DateTime:    2017-10-23 16:05:58
 * @Description: 证书提货
 */

class Pickupgoods extends ApiBase
{
	
	protected $pickupgoodsLogic = 'app\servercertificate\logic\Pickupgoods';
    protected $pickupgoodsValidate = 'app\servercertificate\validate\Pickupgoods';

    /*我的高级证书 - 提货*/
    public function pickUpGoods(): array 
    {
        $data = $this->haveIssetReceiveData(['pick_up_code'=>' ', 'certificate_id'=>0, 'user_id'=>0, 'reason'=>' ', 'order_type'=>' ', 'name'=>' ', 'phone'=>' ', 'address'=>' ']); 
        return  $this->stepRun($data, 'pickUpGoods');
    }

    /*获取我的某证书的提货详情(含订单信息)*/
    public function onePickUpInfo(): array 
    {
    	$data = $this->haveIssetReceiveData(['user_id'=>0, 'certificate_id'=>0]);
    	return $this->stepRun($data, 'onePickUpInfo');
    }

    /*获取我的简单的提货详情*/
    public function simplePickUpInfo(): array 
    {
        $data = $this->haveIssetReceiveData(['user_id'=>0, 'certificate_id'=>0]);
        return $this->stepRun($data, 'simplePickUpInfo');
    }

    /*后台获取某证书的提货详情(含订单信息)*/
    public function adminOnePickUpInfo(): array 
    {
        $data = $this->haveIssetReceiveData(['certificate_id'=>0]);
        return $this->stepRun($data, 'onePickUpInfo');
    }

    /*后台管理员对某证书进行发货操作*/
    public function shipmentsGoods(): array 
    {
        $data = $this->haveIssetReceiveData(['certificate_id'=>0, 'logistics_company_code'=>'', 'logistics_company_name'=>' ', 'waybill_number'=>' ']);
        return $this->stepRun($data, 'shipmentsGoods');
    }

    /*获取我的提货单列表*/
    public function myPickUpList(): array 
    {
        $data = $this->haveIssetReceiveData(['user_id'=>0, 'page'=>1, 'listRows'=>15]);
        return $this->stepRun($data, 'myPickUpList');
    }

    /*获取我的申请提货数量*/
    public function myApplyPickNumber(): array 
    {
        $data = $this->haveIssetReceiveData(['user_id'=>0]);
        return $this->stepRun($data, 'myApplyPickNumber');
    }

    /*后台管理员获取提货单列表*/
    public function pickUpGoodsList(): array 
    {
        $data = $this->haveIssetReceiveData(['keywords'=>'', 'transfer_status'=>'', 'page'=>1, 'listRows'=>15], []);
        return $this->stepRun($data, 'pickUpGoodsList');
    }

    





}